Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Unsafe opaque and acquire/release put and get methods #20475

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Spencer-Comin
Copy link
Contributor

Implement the Unsafe get and put methods with opaque and acquire/release memory semantics by using the corresponding access modes on the unsafe shadow symbols as introduced in eclipse-omr/omr#7517.

Note that this requires a coordinated merge with eclipse-omr/omr#7517.

@Spencer-Comin
Copy link
Contributor Author

@Spencer-Comin Spencer-Comin marked this pull request as ready for review November 7, 2024 15:46
@Spencer-Comin Spencer-Comin force-pushed the acqrel-opaque branch 3 times, most recently from 12739fb to fbe3466 Compare November 25, 2024 15:45
With the expansion of possible memory ordering semantics from binary volatile
or non-volatile to volatile, acquire/release, opaque, and transparent, all
tests  whether a symbol is volatile need to be refined depending on the
intention of the test, i.e. is it testing if the symbol is strictly volatile,
simply opaque, or somewhere in between?

Signed-off-by: Spencer Comin <[email protected]>
Add opaque and acquire/release flavours of get put methods in Unsafe as
recognized methods, and generate unsafe shadow symbols with the correct
access modes when inlining these methods.

Signed-off-by: Spencer Comin <[email protected]>
Since Unsafe.putOrdered is fully supported through acquire/release symbols, we
no longer need to duplicate the call tree to prevent incorrect optimizations.

Signed-off-by: Spencer Comin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant